import { acceptHMRUpdate, defineStore } from "pinia";

export const useChargeStore = defineStore("charge", () => {
    const visible=ref(false);
    const setVisible=(value:boolean)=>visible.value=value;
    const detail=ref({});
    const setDetail=(value:any)=>detail.value=value;
    const chargeType=ref();
    const setChargeType=(value:string)=>chargeType.value=value;
    return {
        visible,
        setVisible,
        detail,
        setDetail,
        chargeType,
        setChargeType,
    };
},{persist:true});

if (import.meta.hot){
    import.meta.hot.accept(acceptHMRUpdate(useChargeStore, import.meta.hot));
}